package com.mes.source;

import org.openbravo.client.kernel.BaseComponentProvider;
import org.openbravo.client.kernel.Component;
import org.openbravo.client.kernel.ComponentProvider;
import javax.enterprise.context.ApplicationScoped;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;

@ApplicationScoped
@ComponentProvider.Qualifier(ImportResourceComponentProvider.Emes_RESOURCE_IMPORT)
public class ImportResourceComponentProvider extends BaseComponentProvider {
	public static final String Emes_RESOURCE_IMPORT = "Emes_RESOURCE_IMPORT";

	@Override
	public Component getComponent(String componentId, Map<String, Object> parameters) {
		throw new IllegalArgumentException("Component id " + componentId + " not supported.");
	}

	@Override
	public List<ComponentResource> getGlobalComponentResources() {
	    final List<ComponentResource> globalResources = new ArrayList();

	    //生产相关
		globalResources.add(createStaticResource("web/com.mes/js/manu/mes-plan-order-button.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/manu/mes-Job-Assign.js", false));
		//globalResources.add(createStaticResource("web/com.mes/js/manu/mes-plan-Assign-User.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/manu/mes_quality_collection.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/manu/mes_dataLinkTracing.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/manu/mes_dataCollection.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/manu/mes_generate_plan.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/manu/mes_generate_material.js", false));

		globalResources.add(createStaticResource("web/com.mes/js/manu/Issuedbutton.js", false));//外协
		//globalResources.add(createStaticResource("web/com.mes/js/manu/Outsourcing.js", false));//外协

		//员工信息相关
		globalResources.add(createStaticResource("web/com.mes/js/emplooy/attendanceButton.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/emplooy/Emesployeebutton.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/emplooy/exhibition_Button.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/emplooy/groupScheduleButton.js", false));

		//BOM和工序配置
		globalResources.add(createStaticResource("web/com.mes/js/bom_process/BomSeeButton.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/bom_process/mes-toolbar-button.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/bom_process/mes_process_route.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/bom_process/DiySeeButton.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/bom_process/ProcessSeeButton.js", false));

		//质量检验
		globalResources.add(createStaticResource("web/com.mes/js/quality/mes_qualityDataCollection.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/quality/mes_qualityCheck.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/quality/mes_quality_ordertable.js", false));


		globalResources.add(createStaticResource("web/com.mes/js/factory_calendar.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/factory_calendar_grid_button.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/mes-on-change.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/uploadButton.js", false));
		globalResources.add(createStaticResource("web/com.mes/js/wx_message_send.js", false));

		return globalResources;
	}
	public List<String> getTestResources() {
		return Collections.emptyList();
	}
}
